/*    */ package com.zhonglee.filter;
/*    */ 
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ import javax.servlet.http.HttpSessionAttributeListener;
/*    */ import javax.servlet.http.HttpSessionBindingEvent;
/*    */ 
/*    */ public class SessionListener
/*    */   implements HttpSessionAttributeListener
/*    */ {
/*    */   public static final String LISTENER_NAME = "_login";
/* 51 */   private static List sessions = new ArrayList();
/*    */ 
/*    */   public void attributeAdded(HttpSessionBindingEvent sbe)
/*    */   {
/* 60 */     if ("_login".equals(sbe.getName()))
/* 61 */       sessions.add(sbe.getValue());
/*    */   }
/*    */ 
/*    */   public void attributeRemoved(HttpSessionBindingEvent sbe)
/*    */   {
/* 72 */     if ("_login".equals(sbe.getName()))
/* 73 */       sessions.remove(sbe.getValue());
/*    */   }
/*    */ 
/*    */   public void attributeReplaced(HttpSessionBindingEvent sbe)
/*    */   {
/*    */   }
/*    */ 
/*    */   public static List getSessions()
/*    */   {
/* 92 */     return sessions;
/*    */   }
/*    */ 
/*    */   public static int getSize() {
/* 96 */     return sessions.size();
/*    */   }
/*    */ }

/* Location:           E:\java\apache-tomcat-6.0.36\webapps\btsm\WEB-INF\classes\
 * Qualified Name:     com.zhonglee.filter.SessionListener
 * JD-Core Version:    0.6.2
 */